#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
#include <sys/wait.h>
#include <stdlib.h>

int main()
{
    pid_t id = fork();
    if(0 == id)
    {
        printf("pid: %d, execl command begin!\n",getpid()); 
        //execl("./mytest", "mytest", NULL);  
        //execl("/usr/bin/bash", "bash", "test.sh", NULL);  
        execl("/usr/bin/python", "python", "test.py", NULL);  
        printf("pid: %d, execl command end!\n",getpid()); 
    }
    else
    {
        pid_t rid = waitpid(-1, NULL, 0);
        if(rid > 0)
        {
            printf("wait success, rid: %d!\n", rid);
        }
    }
    return 0;
}
